3.370 \(\int \frac{(d+e x^r) (a+b \log (c x^n))}{x} \, dx\)

Optimal. Leaf size=53 \[ \frac{d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+\frac{e x^r \left (a+b \log \left (c x^n\right )\right )}{r}-\frac{b e n x^r}{r^2} \]

[Out]

-((b*e*n*x^r)/r^2) + (e*x^r*(a + b*Log[c*x^n]))/r + (d*(a + b*Log[c*x^n])^2)/(2*b*n)

________________________________________________________________________________________

Rubi [A]  time = 0.0880529, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {14, 2351, 2301, 2304} \[ \frac{d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}+\frac{e x^r \left (a+b \log \left (c x^n\right )\right )}{r}-\frac{b e n x^r}{r^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x^r)*(a + b*Log[c*x^n]))/x,x]

[Out]

-((b*e*n*x^r)/r^2) + (e*x^r*(a + b*Log[c*x^n]))/r + (d*(a + b*Log[c*x^n])^2)/(2*b*n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin{align*} \int \frac{\left (d+e x^r\right ) \left (a+b \log \left (c x^n\right )\right )}{x} \, dx &=\int \left (\frac{d \left (a+b \log \left (c x^n\right )\right )}{x}+e x^{-1+r} \left (a+b \log \left (c x^n\right )\right )\right ) \, dx\\ &=d \int \frac{a+b \log \left (c x^n\right )}{x} \, dx+e \int x^{-1+r} \left (a+b \log \left (c x^n\right )\right ) \, dx\\ &=-\frac{b e n x^r}{r^2}+\frac{e x^r \left (a+b \log \left (c x^n\right )\right )}{r}+\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{2 b n}\\ \end{align*}

Mathematica [A]  time = 0.0877378, size = 54, normalized size = 1.02 \[ \frac{e x^r (a r-b n)}{r^2}+a d \log (x)+\frac{b d \log ^2\left (c x^n\right )}{2 n}+\frac{b e x^r \log \left (c x^n\right )}{r} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^r)*(a + b*Log[c*x^n]))/x,x]

[Out]

(e*(-(b*n) + a*r)*x^r)/r^2 + a*d*Log[x] + (b*e*x^r*Log[c*x^n])/r + (b*d*Log[c*x^n]^2)/(2*n)

________________________________________________________________________________________

Maple [C]  time = 0.175, size = 278, normalized size = 5.3 \begin{align*}{\frac{b \left ( dr\ln \left ( x \right ) +e{x}^{r} \right ) \ln \left ({x}^{n} \right ) }{r}}+{\frac{i}{2}}\pi \,\ln \left ( x \right ) bd{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-{\frac{i}{2}}\pi \,\ln \left ( x \right ) bd{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) -{\frac{i}{2}}\pi \,\ln \left ( x \right ) bd \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+{\frac{i}{2}}\pi \,\ln \left ( x \right ) bd \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +{\frac{{\frac{i}{2}}\pi \,be{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{x}^{r}}{r}}-{\frac{{\frac{i}{2}}\pi \,be{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ){x}^{r}}{r}}-{\frac{{\frac{i}{2}}\pi \,be \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}{x}^{r}}{r}}+{\frac{{\frac{i}{2}}\pi \,be \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ){x}^{r}}{r}}-{\frac{bdn \left ( \ln \left ( x \right ) \right ) ^{2}}{2}}+\ln \left ( x \right ) \ln \left ( c \right ) bd+{\frac{\ln \left ( c \right ) be{x}^{r}}{r}}+\ln \left ( x \right ) ad+{\frac{{x}^{r}ae}{r}}-{\frac{{x}^{r}ben}{{r}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^r)*(a+b*ln(c*x^n))/x,x)

[Out]

b*(d*r*ln(x)+e*x^r)/r*ln(x^n)+1/2*I*Pi*ln(x)*b*d*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*Pi*ln(x)*b*d*csgn(I*x^n)*cs
gn(I*c*x^n)*csgn(I*c)-1/2*I*Pi*ln(x)*b*d*csgn(I*c*x^n)^3+1/2*I*Pi*ln(x)*b*d*csgn(I*c*x^n)^2*csgn(I*c)+1/2*I/r*
Pi*b*e*csgn(I*x^n)*csgn(I*c*x^n)^2*x^r-1/2*I/r*Pi*b*e*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*x^r-1/2*I/r*Pi*b*e*c
sgn(I*c*x^n)^3*x^r+1/2*I/r*Pi*b*e*csgn(I*c*x^n)^2*csgn(I*c)*x^r-1/2*b*d*n*ln(x)^2+ln(x)*ln(c)*b*d+1/r*ln(c)*b*
e*x^r+ln(x)*a*d+1/r*x^r*a*e-b*e*n*x^r/r^2

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n))/x,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.32992, size = 167, normalized size = 3.15 \begin{align*} \frac{b d n r^{2} \log \left (x\right )^{2} + 2 \,{\left (b e n r \log \left (x\right ) + b e r \log \left (c\right ) - b e n + a e r\right )} x^{r} + 2 \,{\left (b d r^{2} \log \left (c\right ) + a d r^{2}\right )} \log \left (x\right )}{2 \, r^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n))/x,x, algorithm="fricas")

[Out]

1/2*(b*d*n*r^2*log(x)^2 + 2*(b*e*n*r*log(x) + b*e*r*log(c) - b*e*n + a*e*r)*x^r + 2*(b*d*r^2*log(c) + a*d*r^2)
*log(x))/r^2

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**r)*(a+b*ln(c*x**n))/x,x)

[Out]

Exception raised: TypeError

________________________________________________________________________________________

Giac [A]  time = 1.30248, size = 93, normalized size = 1.75 \begin{align*} \frac{1}{2} \, b d n \log \left (x\right )^{2} + \frac{b n x^{r} e \log \left (x\right )}{r} + b d \log \left (c\right ) \log \left (x\right ) + \frac{b x^{r} e \log \left (c\right )}{r} + a d \log \left (x\right ) - \frac{b n x^{r} e}{r^{2}} + \frac{a x^{r} e}{r} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^r)*(a+b*log(c*x^n))/x,x, algorithm="giac")

[Out]

1/2*b*d*n*log(x)^2 + b*n*x^r*e*log(x)/r + b*d*log(c)*log(x) + b*x^r*e*log(c)/r + a*d*log(x) - b*n*x^r*e/r^2 +
a*x^r*e/r